﻿<%@ WebHandler Language="C#" Class="Mail" %>

using System;
using System.Web;

public class Mail : IHttpHandler
{

    public void ProcessRequest(HttpContext context)
    {
        try
        {
            SendEmail.SendMail.ToSendPwd("cqstars@sina.com", "pt23123", "15266320@qq.com", context.Request["Tit"].ToString(), context.Request.Params["UserName"].ToString(), context.Request.Params["Phone"].ToString(), context.Request.Params["YourContent"].ToString());
            SendEmail.SendMail.ToSendPwd("cqstars@sina.com", "pt23123", "microstat@163.com", context.Request["Tit"].ToString(), context.Request.Params["UserName"].ToString(), context.Request.Params["Phone"].ToString(), context.Request.Params["YourContent"].ToString());
        
        }
        catch (Exception e)
        {
            context.Response.ContentType = "text/plain";
            context.Response.Write("信息有误，重新发送！");
        }
        finally
        {
            context.Response.ContentType = "text/plain";
            context.Response.Write("信息已经送达");
        }
    }

    public bool IsReusable
    {
        get
        {
            return false;
        }
    }

}